import DashboardLayout from "@/layout/dashboard/DashboardLayout.vue";
// GeneralViews
import NotFound from "@/pages/NotFoundPage.vue";
import Recommend from "@/pages/Recommend.vue";
import Detail from "@/pages/Detail.vue";
import DetailAdd from "../pages/DetailAdd.vue";
import DetailEdit from "../pages/DetailEdit.vue";

// Admin pages
const Dashboard = () => import(/* webpackChunkName: "dashboard" */"@/pages/Dashboard.vue");
const Profile = () => import(/* webpackChunkName: "common" */ "@/pages/Profile.vue");
const Notifications = () => import(/* webpackChunkName: "common" */"@/pages/Notifications.vue");
const Icons = () => import(/* webpackChunkName: "common" */ "@/pages/Icons.vue");
const Maps = () => import(/* webpackChunkName: "common" */ "@/pages/Maps.vue");
const Typography = () => import(/* webpackChunkName: "common" */ "@/pages/Typography.vue");
const TableList = () => import(/* webpackChunkName: "common" */ "@/pages/TableList.vue");
const StudentManage = () => import(/* webpackChunkName: "common" */ "@/pages/StudentManage.vue");

const SourceManage = () => import(/* webpackChunkName: "common" */ "@/pages/SourceManage.vue");
const QuestionManage = () => import(/* webpackChunkName: "common" */ "@/pages/QuestionManage.vue");
const CoursesManage = () => import(/* webpackChunkName: "common" */ "@/pages/CoursesManage.vue");
// const CourseMenu = () => import(/* webpackChunkName: "common" */ "@/pages/CourseMenu.vue");
const KnowledgeGraph = () => import(/* webpackChunkName: "common" */ "@/pages/KnowledgeGraph.vue");

const routes = [
  {
    path: "/",
    component: DashboardLayout,
    redirect: "/student-manage",
    children: [
      {
        path: "dashboard",
        name: "仪表盘",
        component: Dashboard
      },
      {
        path: "profile",
        name: "轮廓",
        component: Profile
      },
      {
        path: "notifications",
        name: "通知",
        component: Notifications
      },
      {
        path: "icons",
        name: "图标",
        component: Icons
      },
      {
        path: "maps",
        name: "地图",
        component: Maps
      },
      {
        path: "typography",
        name: "印刷术",
        component: Typography
      },
      {
        path: "table-list",
        name: "表格列表",
        component: TableList
      },
      {
        path: "recommend",
        name: "推荐",
        component: Recommend
      },
      {
        path: "detail",
        name: "详情",
        component: Detail
      },
      {
        path: "detail-add",
        name: "详情",
        component: DetailAdd
      },
      {
        path: "detail-edit",
        name: "详情",
        component: DetailEdit
      },
      {
        path: "student-manage",
        name: "学生信息",
        component: StudentManage
      },
      {
        path: "source-manage",
        name: "成绩管理",
        component: SourceManage
      },
      {
        path: "question-manage",
        name: "试题管理",
        component: QuestionManage
      },
      {
        path: "courses-manage",
        name: "课程管理",
        component: CoursesManage
      },
      {
        path: "knowledge-graph",
        name: "知识图谱",
        component: KnowledgeGraph
      },
      // {
      //   path: "course-menu",
      //   name: "课程菜单",
      //   component: CourseMenu
      // },
    ]
  },
  {path: "*", component: NotFound},
];

export default routes;
